/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package jhave.client;

import javax.swing.*;
import java.util.*;
import java.awt.*;
import org.jdom.Element;

/**
 *
 * @author bosmak40
 */
public class Textfield_Element extends JHAVE_Abstract_TextField_Element implements JHAVE_Element{
    

    Textfield_Element(Element child, JPanel returnedPanel, Vector components){
        super(child, returnedPanel, components);
    }


     /**
     * Adds Textfield element to panel and to components vector.
     *
     */
    public void addElementToPanel(){
        Iterator iter = child.getChildren().iterator();
        JHAVE_Textfield_Factory factory = new JHAVE_Textfield_Factory();

        while(iter.hasNext()){
            Element newChild = (Element) iter.next();
            factory.get_JHAVE_Element(newChild, this.returnedPanel,this.components);
            this.returnedPanel = factory.returnPanel();
            this.components = factory.returnComponents();
        }
    }

    

}
